﻿Public Class frmMakeupPrice
    Dim dt As New DataTable
    Public Sub New()

        ' This call is required by the designer.
        InitializeComponent()
        UI.SetPlaceHolder(txtpercentage, "Persentage (ex. 1.2)")
        UI.SetPlaceHolder(txtshipping, "Shipping Rate")

        dt = Cmd.ExecuteDataTable("select percentage,shipping from tbl_makeupprice")
        txtpercentage.Text = dt.Rows(0).Item("percentage")
        txtshipping.Text = dt.Rows(0).Item("shipping")
        ' Add any initialization after the InitializeComponent() call.

    End Sub

    Private Sub saveMakeup() Handles btnsave.Click
        Try
            Cmd.Parameters("@percent") = txtpercentage.Text
            Cmd.Parameters("@shipp") = txtshipping.Text
            Cmd.ExecuteNonQuery("update tbl_makeupprice set percentage=@percent,shipping=@shipp where makeup_id=1")
            myMsgbox.show("Makeup formation have been update!!", "Update Makeup")
        Catch ex As Exception
            myMsgbox.show("Makeup formation update fail!!", "Update Makeup")
            MessageBox.Show(ex.ToString)
        End Try
    End Sub

    Private Sub saveMakeup(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsave.Click

    End Sub
End Class